package com.dnjn.happiness.biz.domain.vo;


import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum AppraiseGradeIntEnum {

    DA(1, "D-"),
    D(2, "D"),

    CA(3, "C-"),
    C(4, "C"),

    BA(5, "B-"),
    B(6, "B"),

    AA(7, "A-"),
    A(8, "A"),

    SA(9, "S-"),
    S(10, "S");


    private Integer score;

    private String type;


    public static String getType(Integer score) {
        AppraiseGradeIntEnum[] values = AppraiseGradeIntEnum.values();
        for (AppraiseGradeIntEnum item : values) {
            if (score.equals(item.score)) {
                return item.type;
            }
        }
        return null;

    }
}
